CXXFLAGS += -O3 -DNDEBUG -std=c++11 -Isrc -I @mathinc@ @OPENMP_CXXFLAGS@
CPPFLAGS += @amcppflags@

UNAME_S=$(shell uname -s)

ifeq ($(UNAME_S),Darwin)  #macOS clang
	CXXFLAGS += -mmacosx-version-min=10.7 -stdlib=libc++ -Xpreprocessor -fopenmp -lomp
else
	CXXFLAGS += -include src/common/memcpyLink.h -Wl,--wrap=memcpy
	CFLAGS += -include src/common/memcpyLink.h
endif

SOURCES=src/cgi/core_genome_identity.cpp

all : fastANI

fastANI :  
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(SOURCES) -o fastANI @mathlib@ -lstdc++ -lz -lm  

install : fastANI
	mkdir -p @prefix@/bin/
	cp `pwd`/fastANI @prefix@/bin/

clean :
	-rm -f fastANI
